package com.md.api.dao;

import com.md.api.entity.MyShopCart;
import com.md.api.entity.ShoppingCart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface ShoppingCartMapper {
    int deleteById(String cartId);

    int insert(ShoppingCart record);

    List<ShoppingCart> selectAll();


    List<MyShopCart> myCart(String userId);

    List<MyShopCart> getSkuByCartIds(@Param("cartIds") List<String> cartIds);

    int resetProductCount(@Param("cartId")String cartId,@Param("count") Integer count);

    int setOrderNo(@Param("orderNo")String orderNo, @Param("cartIds")List<String> cartIds);

    int deleteByOrderNo(@Param("orderNo")String orderNo);
}